<template>
  <div class="container">
    <div class="total">
      <el-card class="card">
        <span>商户总数</span>
        <span>{{headData.traders}}</span>
      </el-card>
      <el-card class="card">
        <span>商户总数</span>
        <span>{{headData.traders}}</span>
      </el-card>
    </div>
    <el-row >
      <el-col :span="12">
        <el-table :data="tableData" border style="width:100%">
          <el-table-column prop="date" label="日期" width="180" />
          <el-table-column prop="name" label="姓名" width="180" />
          <el-table-column prop="address" label="地址" />
        </el-table>
      </el-col>
      <el-col :span="12">
        <el-table :data="tableData" border style="width:100%">
          <el-table-column prop="date" label="日期" width="180" />
          <el-table-column prop="name" label="姓名" width="180" />
          <el-table-column prop="address" label="地址" />
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      headData: {
        group_sum: "",
        payway_sum: "",
        payway_unused: "",
        traders: "100",
        today_recharge_sum: "",
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
    }
  },
  methods: {
    getHeadData() {
      //获取头部数据
      this.request("payway/getPaywayGroupStatistics", {}).then((res) => {
        console.log(res)
      })

      this.request("payway/GetAgentGroup", {}).then((res) => {
        console.log(res)
      })
    },
  },
  created() {
    this.getHeadData()
  },
}
</script>
<style lang="scss" scoped>
.total {
  display: flex;
  margin-bottom: 10px;
  .card {
    margin-right: 10px;
    ::v-deep .el-card__body {
      display: flex;
      flex-direction: column;
      align-items: center;
      span {
        font-size: 14px;
      }
      span:last-child {
        font-size: 16px;
        margin-top: 7px;
        color: #f00;
        font-weight: bold;
      }
    }
  }
}
</style>
